package com.tuanzi.loan.business.service.family;

import com.tuanzi.loan.business.entity.family.LoanChannelNdInfo;
import com.tuanzi.loan.business.entity.family.LoanLargeAmountPartnerControl;
import com.tuanzi.loan.core.service.BaseAuditService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.LoanLargeAmountPartnerControlSearchRequest;
import com.tuanzi.loan.vo.response.family.LoanLargeAmountPartnerControlSearchResponse;
import com.tuanzi.server.loan_base.model.db.LoanWholeSaleComment;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @Description:    大额合作方配置后台
* @Author:         xionghao
* @CreateDate:     2018/12/24
*/
@Service
public interface LoanLargeAmountPartnerControlService
        extends BaseAuditService<LoanLargeAmountPartnerControl,Long> {
    /**
     * 读取控制后台信息
     * @param pageSearcher
     * @return
     */
    Page<LoanLargeAmountPartnerControlSearchResponse> list(PageSearcher<LoanLargeAmountPartnerControlSearchRequest> pageSearcher);

    /**
     * 增加或者修改配置项
     * @param loanLargeAmountPartnerControl
     * @return
     */
    @Override
    LoanLargeAmountPartnerControl saveOrUpdate(LoanLargeAmountPartnerControl loanLargeAmountPartnerControl);

    /**
     * 删除配置项
     * @param id
     */
    void deleteInfoById(Long id);

    /**
     * 判断来源
     * @param type
     * @return
     */
    String judgeCfrom(Integer type);

    /**
     * 更新数据项
     * @param request
     */
    void updateInfoById(LoanLargeAmountPartnerControlSearchRequest request);

    /**
     * 查询所有甲方
     * @return
     */
    List<LoanWholeSaleComment> getPartnerInfo();

    /**
     * 查询所有的代理渠道
     * @return
     */
    List<LoanChannelNdInfo> findAllChannelN();

}
